package com.example.Web_chat.mapper;

import com.example.Web_chat.model.FriendRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FriendRequestMapper {
    //查询好友申请列表
    List<FriendRequest> selectFriendRequests(@Param("userId") int userId);
    // 获取好友申请得id
    FriendRequest getFriendRequestById(@Param("id") int id);
    // 拒绝好友申请
    int deleteFriendRequest(@Param("id") int id);

    Integer checkFriendRequest(@Param("userId") int userId, @Param("friendId") int friendId);

    // 插入好友请求
    int insertFriendRequest(@Param("fromUserId") int fromUserId, @Param("toUserId") int toUserId);


}
